// $Id: hello.cpp 2 2009-09-02 08:47:42Z joseph2002 $
/*
 * Copyright 2009 Joseph Wu
 * Distributed under the Boost Software License, Version 1.0.
 * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
 *
 * For more information, see http://xpcomplus.sourceforge.net
 */

#include "hello.hpp"

namespace xpcom {
namespace example {

HelloWorld::HelloWorld() :
    default_world_("World")
{
}

string HelloWorld::sayHello(const char* world)
{
    string ret("Hello ");
    if (world)
        ret += world;
    else
        ret += default_world_;
    ret += "!";
    return ret;
}

} // namespace xpcom::example
} // namespace xpcom
